import { App } from 'vue'
import { getDict } from '@/api/system/dict'
import { handleTree, selectDictLabel } from '@/utils/common'

/**
 * 待开发的全局方法注册
 */
export function setupGlobalMethods(app: App) {
  // @ts-ignore
  const { $dialog, $message, $notification } = window
  app.config.globalProperties.$dialog = $dialog
  app.config.globalProperties.$message = $message
  app.config.globalProperties.$notification = $notification
  app.config.globalProperties.getDict = getDict
  app.config.globalProperties.handleTree = handleTree
  app.config.globalProperties.selectDictLabel = selectDictLabel
}
